<!-- The documentation for the LL(1) parsing view. -->

<HTML><HEAD>
<TITLE>LL(1) Parsing</TITLE>
</HEAD><BODY>

<H1>LL(1) Parsing</H1>

<CENTER><IMG SRC="images/LLparse.png" ALT="A sample LL(1) parse." WIDTH="419" HEIGHT="398" BORDER="1"><BR>In the middle of a sample LL(1) parsing.</CENTER>

<P>Before LL(1) parsing can take place, first an LL(1) parse table must be defined according to the operations defined <A HREF="gui.grammar.parse.LLParseTableDerivationPane.html">here</A>.</P>

<P>First, one enters a string to attempt to parse in the text field labeled "Input."  When one has entered the string, one either presses "Start" or types return to begin the process of parsing.</P>

<P>After a string is entered, one repeatedly presses "Step" to show the next phase of the parse.  The "Input Remaining" shows what input the parser has yet to process, including a terminating <VAR>$</VAR> character.  The "Stack" shows the current contents of the stack.  A message at the bottom of the window will show what is currently happening; in the image above, it shows that we are in the process of replacing <VAR>S</VAR> with <VAR>aSb</VAR>.  JFLAP will highlight the node of the tree that was last processed on the stack.  Whenever an entry in the parse table is used, that entry is highlighted in the table.  One presses this step button until the string is either accepted or rejected by the parse table.</P>

<P>The default view is a non-inverted tree.  In the tree, <FONT COLOR="#CCCC00">yellow nodes</FONT> are the leaf nodes, i.e., terminals.  <FONT COLOR="#009966">Green nodes</FONT> are internal nodes, i.e., non-terminals.  There are other view options available.  The current display shows a non-inverted parse tree.  Also available is an "Inverted Tree" which is the same thing drawn upside down, which is more useful for LR(1) parsing.  Also available is the string derivation view: for LL(1), this will show the attempts of the parser to derive the input string from the start variable, and the productions used in this derivation.</P>

</BODY></HTML>
